<?php
class PinturasDAO extends CI_Model {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    function get_obras($obra_inicio,$obra_fin)
    {
    	return $this->db->query("SELECT * FROM pinturas where id between $obra_inicio AND $obra_fin")->result();
    }
    function num_obras()
    {
    	return $this->db->query('SELECT count(1) AS NUM_OBRAS FROM pinturas')->row();
    }
    function get_configuracion()
    {
    	return $this->db->get('configuracion')->row();
    }
}
    